package com.example.gymmanagement.controller;


import com.example.gymmanagement.Utils.Result;
import com.example.gymmanagement.service.LoginService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/logout")

public class LogoutController {
    @Autowired
    private LoginService loginService;

    @GetMapping
    @ApiOperation("退出登录")
    public Result logout(@RequestHeader("Authorization") String token){
        return loginService.logout(token);
    }
}
